import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../components/login.vue'
import forget from '../components/forget.vue'
import home from '../components/home.vue'
import ShouYe from '../components/ShouYe.vue'
import DingDan from '../components/DingDan.vue'
import Search from '../components/Search.vue'
import Colloge from '../components/Colloge.vue'
import User from '../components/User.vue'
import Hot from '../components/Hot.vue'
import ShangMore from '../components/ShangMore.vue'
import CaiMore from '../components/CaiMore.vue'
import Register from '../components/Register.vue'


Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/login' },
  { path: '/login', component: login },
  { path: '/forget', component: forget },
  { path: '/Register', component: Register },
  {
    path: '/home',
    component: home,
    redirect: '/ShouYe',
    children: [
      { path: '/ShouYe', component: ShouYe },
      { path: '/DingDan', component: DingDan },
      { path: '/Search', component: Search },
      { path: '/Colloge', component: Colloge },
      { path: '/User', component: User },
      { path: '/Hot', component: Hot },
      { path: '/ShangMore', component: ShangMore },
      { path: '/CaiMore', component: CaiMore },
    ]
  }
]
const router = new VueRouter({
  routes
})

export default router
